﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using Sector7.Framework.Core;
using Sector7.Framework.DataDictionary.Agents;
using Sector7.Framework.DataDictionary.CORS;
using Sector7.Framework.DataDictionary.Utility;
using Sector7.Framework.DB;
using Sector7.Framework.Enums;
using Sector7.Framework.Utility;

namespace Sector7.Framework.DataDictionary.Windows
{
    /// <summary>
    /// MainWindow.xaml 的交互逻辑
    /// </summary>
    public partial class MainWindow : MainWindowBase
    {
        private List<S7_DataTemplate> m_dataTemplates = null;

        public MainWindow()
        {
            InitializeComponent();
        }

        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            Senvironments.MainWindow = this;
        }

        private void btnInitDB_Click(object sender, RoutedEventArgs e)
        {
            SystemServiceAgent.InitializeDatabase();
        }

        private void btnDataMove_Click(object sender, RoutedEventArgs e)
        {
            DataMoveWindow addDataMoveWindow = new DataMoveWindow();
            addDataMoveWindow.InitializeWindow(CrudType.Create);

            addDataMoveWindow.ShowDialog();
        }
    }
}
